package com.xinhua.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="t_period")
public class Period {
	private Integer id;
	private Date date;
	private Integer period;
	
	private List<SurveyDetail> sDetails;
	
	public Period() {
		// TODO Auto-generated constructor stub
	}

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
    
	@OneToMany(mappedBy="pd")
	@JsonIgnore
	public List<SurveyDetail> getsDetails() {
		return sDetails;
	}

	public void setsDetails(List<SurveyDetail> sDetails) {
		this.sDetails = sDetails;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Integer getPeriod() {
		return period;
	}

	public void setPeriod(Integer period) {
		this.period = period;
	}
}
